package com.yf.user.pojo;


import com.yf.user.domain.DrMember;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
public class DrUserDTO implements Serializable {

    protected Integer uid;
    protected String realName;
    protected String mobilePhone;
    protected String email;

    public static DrUserDTO from(DrMember drMember) {
        DrUserDTO userDTO = new DrUserDTO();
        if (drMember == null) {
            return userDTO;
        }

        userDTO.setUid(drMember.getUid());
        userDTO.setRealName(drMember.getRealName());
        userDTO.setMobilePhone(drMember.getMobilePhone());
        userDTO.setEmail(drMember.getEmail());

        return userDTO;
    }
}
